<!DOCTYPE html>
<html lang="en"><head><title id="title">06-在浏览器中使用art-template</title></head>

<body>
  <script src="./node_modules/art-template/lib/template-web.js"></script>
  <script type="text/template" id="tpl">
    hello, my name is: {{ name }}
	i am {{ age }} years old
	i come from {{ province }}
	i like: {{each hobbies}} {{ $value }} {{/each}}
  </script>
  
  <script>
    var ret = template('tpl', {
	  name: 'Jack',
	  age: 18,
	  province: 'Beijing',
	  hobbies: [
	    'coding',
		'singing',
		'game'
	  ]
	});
	console.log(ret);
  </script>
</body>
</html>